/**
 * 获取范围区间随机值
 * @param min
 * @param max
 * @param step
 * @returns
 */
export const generatorArray = (min: number, max: number, step: number) => {
  let len = Math.abs(max - min)
  if (len <= 0) return []
  let arr = new Array(len)
  let cNum = min
  let cIndex = 0
  function addArr(index: number, val: number) {
    if (cNum >= min && cNum <= max) {
      arr[index] = cNum
      cNum++
      cIndex++
      addArr(cIndex, cNum)
    }
  }
  addArr(cIndex, cNum)
  return arr.filter((item) => item % step == 0)
}

// console.log(generatorArray(-1, 19, 3))
